/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package bs.stock.modelo;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author ctrosch
 */
@Entity
@Table(name = "st_formula")
public class Fomula implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * Código de formular
     */
    @Id
    @Basic(optional = false)
    @Column(name = "STTFOR_FORMUL", nullable = false, length = 8)
    private String formul;
    /**
     * Descripción
     */
    @Basic(optional = false)
    @Column(name = "STTFOR_DESCRP", nullable = false, length = 60)
    private String descrp;
    /**
     * Genera historico de cambios
     */
    @Column(name = "STTFOR_GENHIS")
    private Character genhis;
    /**
     * Genera formual aplanada
     */
    @Column(name = "STTFOR_GENPLA")
    private Character genpla;
    @Column(name = "STTFOR_TIPPLA", length = 8)
    private String tippla;
    @Column(name = "STTFOR_GENAUT")
    private Character genaut;
    @Column(name = "STTFOR_SQLSQL", length = 255)
    private String sqlsql;
    @Column(name = "STTFOR_FECALT")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fecalt;
    @Column(name = "STTFOR_FECMOD")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fecmod;
    @Column(name = "STTFOR_USERID", length = 15)
    private String userid;
    @Column(name = "STTFOR_ULTOPR")
    private Character Ultopr;
    @Column(name = "STTFOR_DEBAJA")
    private Character debaja;
    @Column(name = "STTFOR_HORMOV", length = 10)
    private String hormov;
    @Column(name = "STTFOR_MODULE", length = 10)
    private String module;
    @Column(name = "STTFOR_OALIAS", length = 10)
    private String oalias;
    @Lob
    @Column(name = "STTFOR_TSTAMP")
    private byte[] tstamp;
    @Column(name = "STTFOR_LOTTRA", length = 6)
    private String lottra;
    @Column(name = "STTFOR_LOTREC", length = 6)
    private String lotrec;
    @Column(name = "STTFOR_LOTORI", length = 6)
    private String lotori;
    @Column(name = "STTFOR_SYSVER", length = 10)
    private String sysver;
    @Column(name = "STTFOR_CMPVER", length = 10)
    private String cmpver;

    public Fomula() {
    }

    public Fomula(String Formul) {
        this.formul = Formul;
    }

    public Fomula(String Formul, String Descrp) {
        this.formul = Formul;
        this.descrp = Descrp;
    }

    public Character getUltopr() {
        return Ultopr;
    }

    public void setUltopr(Character Ultopr) {
        this.Ultopr = Ultopr;
    }

    public String getCmpver() {
        return cmpver;
    }

    public void setCmpver(String cmpver) {
        this.cmpver = cmpver;
    }

    public Character getDebaja() {
        return debaja;
    }

    public void setDebaja(Character debaja) {
        this.debaja = debaja;
    }

    public String getDescrp() {
        return descrp;
    }

    public void setDescrp(String descrp) {
        this.descrp = descrp;
    }

    public Date getFecalt() {
        return fecalt;
    }

    public void setFecalt(Date fecalt) {
        this.fecalt = fecalt;
    }

    public Date getFecmod() {
        return fecmod;
    }

    public void setFecmod(Date fecmod) {
        this.fecmod = fecmod;
    }

    public String getFormul() {
        return formul;
    }

    public void setFormul(String formul) {
        this.formul = formul;
    }

    public Character getGenaut() {
        return genaut;
    }

    public void setGenaut(Character genaut) {
        this.genaut = genaut;
    }

    public Character getGenhis() {
        return genhis;
    }

    public void setGenhis(Character genhis) {
        this.genhis = genhis;
    }

    public Character getGenpla() {
        return genpla;
    }

    public void setGenpla(Character genpla) {
        this.genpla = genpla;
    }

    public String getHormov() {
        return hormov;
    }

    public void setHormov(String hormov) {
        this.hormov = hormov;
    }

    public String getLotori() {
        return lotori;
    }

    public void setLotori(String lotori) {
        this.lotori = lotori;
    }

    public String getLotrec() {
        return lotrec;
    }

    public void setLotrec(String lotrec) {
        this.lotrec = lotrec;
    }

    public String getLottra() {
        return lottra;
    }

    public void setLottra(String lottra) {
        this.lottra = lottra;
    }

    public String getModule() {
        return module;
    }

    public void setModule(String module) {
        this.module = module;
    }

    public String getOalias() {
        return oalias;
    }

    public void setOalias(String oalias) {
        this.oalias = oalias;
    }

    public String getSqlsql() {
        return sqlsql;
    }

    public void setSqlsql(String sqlsql) {
        this.sqlsql = sqlsql;
    }

    public String getSysver() {
        return sysver;
    }

    public void setSysver(String sysver) {
        this.sysver = sysver;
    }

    public String getTippla() {
        return tippla;
    }

    public void setTippla(String tippla) {
        this.tippla = tippla;
    }

    public byte[] getTstamp() {
        return tstamp;
    }

    public void setTstamp(byte[] tstamp) {
        this.tstamp = tstamp;
    }

    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    
    @Override
    public int hashCode() {
        int hash = 0;
        hash += (formul != null ? formul.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Fomula)) {
            return false;
        }
        Fomula other = (Fomula) object;
        if ((this.formul == null && other.formul != null) || (this.formul != null && !this.formul.equals(other.formul))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "isd.inventario.modelo.ST_Fomulas[formul=" + formul + "]";
    }

}
